package org.atlantis.netty.decoder;

import java.net.InetSocketAddress;
import java.util.concurrent.Executors;

import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;

public class DecoderServer {

	public static void main(String[] args) {
		ServerBootstrap server = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(),
				Executors.newCachedThreadPool()));
		ChannelPipeline pipeline = Channels.pipeline();
		// pipeline.addLast("oneToone", new SimpleOnetoOneDecoder());
		pipeline.addLast("stateListener", new StateListenerHandler());
		server.setPipeline(pipeline);
		server.bind(new InetSocketAddress(6666));
	}
}
